/**
	@file
	Input/output functions. Working with ports, screen, keyboard.
	@note Keyboard input not implemented yet.
	@author Konstantin Kastanov
*/
#ifndef IO_H
#define IO_H
#include "dataTypes.h"


struct virtual_console_struct
{
	BOOL focused;
	u16int buffer[2000];
	u8int x_cursor, y_cursor;
	u8int attribute_byte;
	u8int text_colour;
	u8int bg_colour;
	u8int x_blocked, y_blocked;
};
typedef struct virtual_console_struct virtual_console_type;
void putColouredChar(u8int ascii, u8int bgColour, u8int fgColour, u8int x, u8int y);
void putString(s8int *message);
void outb(u16int port, u8int value);
u8int inb(u16int port);
u16int inw(u16int port);
void printf(s8int *str, ...);
void putChar(char c);
void clearScreen();
void setCursor(u8int x, u8int y);
void setTextColour(u8int colour);
void setBgColour(u8int colour);
s8int* decimalToString(s32int num, s8int *buff, u32int buffLength);
s8int* hexToString(s32int num, s8int *buff, u32int buffLength, BOOL uppercase, BOOL sgned);
void setCurrentVirtualConsole(virtual_console_type* console);
void cloneRealConsole(virtual_console_type* console);
u8int* getString(u8int* buff);
void clearVirtualConsole(virtual_console_type* console);
#endif
